package day1.p2;

public class Rectangle {

	private int length, bredth;

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		if (length > 0)
			this.length = length;
		else
			this.length = 0;
	}

	public int getBredth() {
		return bredth;
	}

	public void setBredth(int bredth) {
		this.bredth = bredth;
	}

	public Rectangle(int length, int bredth) {
		this.length = length;
		this.bredth = bredth;
	}

	public Rectangle() {
		this.length = 0;
		this.bredth = 0;
	}

	private int calculateArea() {
		return (length * bredth);
	}

	public void display() {
		System.out.println("Lenght : " + length + " Bredth : " + bredth);
		System.out.println("Area : " + calculateArea());
	}

}